home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / sphigs / sph_dos.lha / dos / sphdemo / readme < prev    next >
Encoding:
Text File  |  1991-11-26  |  3.5 KB  |  87 lines

  1. We provide the source code (3 .c files and 3 .h files) for a demo program.
  2.  
  3. You need to edit the source code before you compile.  In the main.c, find this
  4. line:
  5.        SPH_begin (500,400, numplanes, numshades);
  6.  
  7. Change the first two numbers so they represent the size of (number of pixels
  8. across and down) your screen.
  9.  
  10. Also look for this line in main.c:
  11.                     READ_FROM_STDIN = TRUE;
  12.  
  13. You may need to change TRUE to FALSE to get things to work on your system.
  14.  
  15.  
  16.  
  17. This program is an interactive model-viewing system.  A model of a neighborhood
  18. of houses is created and the camera is initialized.  You can change the
  19. camera's position, orientation, and parameters by using keystrokes.  The user
  20. interface is poor, but it is a satisfactory method for getting acquainted with
  21. the SPHIGS camera model.
  22.  
  23. Two images of the model are visible on the screen.  In the larger viewport is a
  24. solid, shaded image that is the (currently) highest-quality image SPHIGS can
  25. produce.  In the smaller viewports are wireframe-raw images produced using
  26. ORTHOGRAPHIC projection; they also show the view volume and the location of the
  27. PRP and VRP.
  28.  
  29. To QUIT (exit) the program type Q or q
  30.  
  31. The numeric keys allow you to choose which part of the camera you wish to
  32. modify.  Each time you hit one of these keys, a prompt is sent to the screen to
  33. remind you which camera part you are currently manipulating.
  34.  
  35.     1    change the VRP along the UVN axes
  36.            (to move the camera relative to current orientation)
  37.     2    change the VRP along the XYZ axes
  38.            (to move the camera relative to World Coordinate system)
  39.     3    change the VPN (to rotate the camera)
  40.     4    change the PRP (to change the focal length)
  41.     5    change the front clipping-plane distance
  42.     6    change the back clipping-plane distance
  43.  
  44.     0    restore the camera to default location, orientation, etc.
  45.  
  46. You manipulate the "camera part" that you have selected, on three axes:
  47.     X (or U)
  48.     Y (or V)
  49.     Z (or N)
  50.  
  51. To manipulate on the X axis, you use "s" for left and "d" for right.
  52.     "s" subtracts                   "d" adds
  53.  
  54. To manipulate on the Y axis, you use "e" for up and "x" for down.
  55.     "x" subtracts                   "e" adds
  56.  
  57. To manipulate on the Z axis, you use "=" to move away from the model (towards
  58. positive infinity) and "-" to move into the model.  (The model's vertices all
  59. have negative Z coords.)
  60.     "-" subtracts                   "=" adds
  61.  
  62. Each time you hit one of the above six keys, the camera is moved by STEPSIZE
  63. units or rotated by STEPSIZE degrees.  The default step size is 30
  64. units/degrees, but you can manipulate the step size using the "<" (to decrease
  65. it by 5) and ">" (to increase it by 5) keys.  The current step size is
  66. echoed to the console whenever it is changed.
  67.  
  68. You can restore the camera's attributes to their default values (as they are
  69. when the program starts up) by hitting '0'.  This is a great way to recover if
  70. you've gotten "lost".
  71.  
  72. You can add a chimney to each house by entering a capital "C", and remove it by
  73. entering a lowercase "c".
  74.  
  75. You can eliminate the wireframe orthographic views (and blow up the nicely
  76. renderered view to full window size) by hitting lowercase 'a', and restore all
  77. the views by hitting capital 'A'.
  78.  
  79. You can toggle the larger view between its default lit-flat rendering and
  80. the alternative "high-quality wireframe" by hitting:
  81.     "n"                     to set rendering to lit-flat
  82.     "m"                     to set rendering to wireframe
  83.  
  84. Input pick correlation is demonstrated by simply clicking the mouse button
  85. anywhere within the main (perspective) viewport.  If you click on any part of a
  86. house, you will see a message reporting which house you picked.
  87.